package com.zpf.service.impl;

import com.zpf.dao.UserDao;
import com.zpf.dao.impl.UserDaoImpl2;
import com.zpf.pojo.User;
import com.zpf.service.UserService;

import java.util.List;

public class UserServiceImpl2 implements UserService {

//    UserDao userDao = new UserDaoImpl2();
    private UserDao userDao;//默认值是null，要在applicationContext.xml配置,由spring实例化

    public UserDao getUserDao() {
        return userDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    @Override
    public void registUser() {
        userDao.insertUser();
        System.out.println("====UserService的第二个实现类=========");
    }

    @Override
    public List<User> findUserAll() {
        return null;
    }

    @Override
    public void insertUser(User user) {

    }

    @Override
    public void updateUser(User user) {

    }

    @Override
    public void deleteUser(Integer id) {

    }
}
